#include <cstdio>

int main(int argc, char const* argv[])
{
    //用while(gets())不知道为什么只有9分
    char input_string[50];
    scanf("%s", input_string);
    int total_sum = 0;
    total_sum += (input_string[0] - '0') * 1;
    total_sum += (input_string[2] - '0') * 2;
    total_sum += (input_string[3] - '0') * 3;
    total_sum += (input_string[4] - '0') * 4;
    total_sum += (input_string[6] - '0') * 5;
    total_sum += (input_string[7] - '0') * 6;
    total_sum += (input_string[8] - '0') * 7;
    total_sum += (input_string[9] - '0') * 8;
    total_sum += (input_string[10] - '0') * 9;
    int mod_num = total_sum % 11;
    char final_num;
    if (mod_num == 10) 
        final_num = 'X';
    else 
        final_num = mod_num + '0';

    if (input_string[12] == final_num) {
        puts("Right");
    } else {
        input_string[12] = final_num;
        puts(input_string);
    }

    return 0;
}